package org.qh.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 状态
 */
@Getter
@AllArgsConstructor
public enum StringStatusEnum {

    ENABLE("0", "已开启"), DISABLE("1", "已关闭"), CLOSE("2", "注销");

    private final String code;
    private final String info;

    public static Boolean isEnable(String code) {
        return StringStatusEnum.ENABLE.getCode().equals(code);
    }

    public static Boolean isDisable(String code) {
        return StringStatusEnum.DISABLE.getCode().equals(code);
    }

}
